package com.daoeping.action;

import com.daoeping.domain.Bzn_jobdescription;
import com.daoeping.domain.JsonData;
import com.daoeping.domain.Page;
import com.daoeping.domain.TableData;
import com.daoeping.service.JobService;

public class JobAction {
	private JobService jobService;
	private Page page;
	private TableData tableData;
	private JsonData jsonData;
	private Bzn_jobdescription bzn_jobdescription;
	
	public Bzn_jobdescription getBzn_jobdescription() {
		return bzn_jobdescription;
	}

	public void setBzn_jobdescription(Bzn_jobdescription bzn_jobdescription) {
		this.bzn_jobdescription = bzn_jobdescription;
	}

	public Page getPage() {
		return page;
	}

	public void setPage(Page page) {
		this.page = page;
	}

	public TableData getTableData() {
		return tableData;
	}

	public void setTableData(TableData tableData) {
		this.tableData = tableData;
	}

	public JsonData getJsonData() {
		return jsonData;
	}

	public void setJsonData(JsonData jsonData) {
		this.jsonData = jsonData;
	}

	public JobService getJobService() {
		return jobService;
	}

	public void setJobService(JobService jobService) {
		this.jobService = jobService;
	}
	public String findAllJob(){
		jsonData = new JsonData();
		jsonData = jobService.pageBzn_jobdescriptionsJson(page, tableData, bzn_jobdescription );
		return "alljob";
	}
	public String findJobDetail(){
		bzn_jobdescription = jobService.findBzn_jobdescriptionDetail(bzn_jobdescription);
		return "jobdetail";
	}
	
	public String addJobDetail(){
		if(jobService.addBzn_jobdescriptionDetail(bzn_jobdescription)){
			return"addjobdetail";
		}else{
			return "exception";
		}
		
	}
	
	public String findJobDetailForModify(){
		jsonData = new JsonData();
		jsonData = jobService.findBzn_jobdescriptionDetailForModifyJson(bzn_jobdescription);
		return "jobdetailformodify";
	}
	
	public String modifyJobDetail(){
		if(jobService.modifyBzn_jobdescriptionDetail(bzn_jobdescription)){
			return "modifyjobdetail";
		}else{
			return "exception";
		}
		
	}
}
